package com.jiuqi.irs.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="TB_UNITBANK"
 *     
*/
public class TbUnitbank implements Serializable {

    /** identifier field */
    private String ubGuid;

    /** persistent field */
    private String orgCode;

    /** persistent field */
    private String bankId;

    /** persistent field */
    private String year;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public TbUnitbank(String ubGuid, String orgCode, String bankId, String year, String reserved1, String reserved2, String reserved3) {
        this.ubGuid = ubGuid;
        this.orgCode = orgCode;
        this.bankId = bankId;
        this.year = year;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public TbUnitbank() {
    }

    /** minimal constructor */
    public TbUnitbank(String ubGuid, String orgCode, String bankId, String year) {
        this.ubGuid = ubGuid;
        this.orgCode = orgCode;
        this.bankId = bankId;
        this.year = year;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="UB_GUID"
     *         
     */
    public String getUbGuid() {
        return this.ubGuid;
    }

    public void setUbGuid(String ubGuid) {
        this.ubGuid = ubGuid;
    }

    /** 
     *            @hibernate.property
     *             column="ORG_CODE"
     *             length="42"
     *             not-null="true"
     *         
     */
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /** 
     *            @hibernate.property
     *             column="BANK_ID"
     *             length="16"
     *             not-null="true"
     *         
     */
    public String getBankId() {
        return this.bankId;
    }

    public void setBankId(String bankId) {
        this.bankId = bankId;
    }

    /** 
     *            @hibernate.property
     *             column="YEAR"
     *             length="4"
     *             not-null="true"
     *         
     */
    public String getYear() {
        return this.year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="100"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="150"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("ubGuid", getUbGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof TbUnitbank) ) return false;
        TbUnitbank castOther = (TbUnitbank) other;
        return new EqualsBuilder()
            .append(this.getUbGuid(), castOther.getUbGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getUbGuid())
            .toHashCode();
    }

}
